/**
 * Created by luckyjing on 16/2/4.
 */
var path = require('path');
var company = require('../constant/company');
var rentStatus = require('../constant/rentStatus');
var section = require('../constant/section');
var tool = require('../constant/tool');
var userType = require('../constant/userType');
exports.render = function (req, res) {
    if (req.isAuthenticated()) {
        res.sendFile(path.join(__dirname, '../views/index.html'));
    } else {
        res.redirect('/');
    }
};

exports.upload = function (req, res) {
    res.json({
        result: 'success'
    });
};
exports.constant = (req, res)=> {
    res.json({
        company, rentStatus, section, tool, userType
    })
};